package com.smritimap.demo.fragment;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.annotation.Nullable;
import androidx.fragment.app.Fragment;

import com.smritimap.demo.R;
import com.smritimap.demo.StarEntity;
import com.ymxk.timestar.view.smritimap.SmritiEntity;
import com.ymxk.timestar.view.smritimap.SmritiMapView;

import java.util.ArrayList;
import java.util.List;


public class SmritiMapFragment extends Fragment {

    View mView;
    private SmritiMapView smritiMapView;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        mView = mView.inflate(getActivity(), R.layout.fragment_smriti_map, null);
        return mView;
    }

    @Override
    public void onStart() {
        super.onStart();
        smritiMapView = mView.findViewById(R.id.smritiMapView);
        List<SmritiEntity> list = new ArrayList<>();
        list.add(new StarEntity("哈嗝乐特飞星", com.ymxk.timestar.smritimap.R.mipmap.ic_defalut_star));
        list.add(new StarEntity("麦霸星", com.ymxk.timestar.smritimap.R.mipmap.ic_defalut_star));
        list.add(new StarEntity("法律之盾星球(我)", com.ymxk.timestar.smritimap.R.mipmap.ic_defalut_star));
        list.add(new StarEntity("游戏之王星", com.ymxk.timestar.smritimap.R.mipmap.ic_defalut_star));
        list.add(new StarEntity("会飞的城堡", com.ymxk.timestar.smritimap.R.mipmap.ic_defalut_star));
        list.add(new StarEntity("哈嗝乐特飞星", com.ymxk.timestar.smritimap.R.mipmap.ic_defalut_star));
        smritiMapView.setSmritiEntityList(list);
    }
}
